Skip to content

ci: Migrate from prettier to oxfmt - #3732

Merged
pulpdrew merged 2 commits into
mainfrom
drew/oxfmt
Nov 20, 2026
Merged

pulpdrew merged 2 commits into
mainfrom
drew/oxfmt

Conversation

@pulpdrew

@pulpdrew pulpdrew commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR migrates the repo from prettier to oxfmt.

Why? Faster formats and format checks!

Editor setup: developers need the oxc VS Code extension instead of the prettier one.

How much faster?

Screenshot 2026-11-19 at 2 32 31 PM Screenshot 2026-11-19 at 2 32 36 PM

Tradeoffs

oxfmt is still relatively new, and there are a few small formatting changes vs prettier, applied in this PR.

How to reproduce

Run the lint / format step (skip cache for a fair duration):

NX_SKIP_NX_CACHE=true make ci-lint

References

  • Linear Issue:
  • Related PRs:

@changeset-bot

changeset-bot Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 9e5149f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hyperdx-oss Ready Ready Preview Nov 20, 2026 4:41pm UTC
hyperdx-storybook Ready Ready Preview Nov 20, 2026 4:41pm UTC

Request Review

@pulpdrew
pulpdrew added this pull request to stack #3733 November 19, 2026 19:06
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Duplicate code analysis

No new duplicate code introduced by this PR.


jscpd compared this branch against origin/main
across app, api and common-utils. Only new clones are listed; the codebase
currently holds 108 in total (1.13%).
Run yarn dupes locally to reproduce, or yarn dupes:all for the full picture.

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

E2E Test Results

✅ All tests passed • 470 passed • 1 skipped • 1289s

Status Count
✅ Passed 470
❌ Failed 0
⚠️ Flaky 12
⏭️ Skipped 1

Tests ran across 4 shards in parallel.

View full report →

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

🟡 Tier 3 — Standard

Introduces new logic, modifies core functionality, or touches areas with non-trivial risk.

Why this tier:

  • Diff size: 293 production lines changed (Tier 2 max: < 250)
  • Cross-layer change: touches frontend (packages/app) + backend (packages/api) + shared utils (packages/common-utils)
  • Touches API routes or data models — hidden complexity risk

Additional context: touches background tasks or the delivery pipeline lightly (2 lines, under the 30-line bar for Tier 4), 2 file(s) in private internal-tooling packages, excluded from the line count

Review process: Full human review — logic, architecture, edge cases.
SLA: First-pass feedback within 1 business day.

Stats
  • Production files changed: 33
  • Production lines changed: 293 (+ 6 in test files, excluded from tier calculation)
  • Branch: drew/oxfmt
  • Author: pulpdrew

To override this classification, remove the review/tier-3 label and apply a different review/tier-* label. Manual overrides are preserved on subsequent pushes.

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

PR Review

✅ No issues found.

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Deep Review

Formatter migration (prettier → oxfmt): config swap, lint/lint:fix rewrites across all packages, root lint-staged, Dockerfiles, nx.json, the docker-build CI workflow, VS Code settings, and mechanical reformatting of existing TS/CSS. All reformatting hunks were checked and are semantically identical to the originals (the as-cast reflow in metadata.ts, the ternary collapses in generate.ts, the && chains in the metric hooks, the JSX .{' '} reflows, and the okJson({}) mock reflow all preserve behavior). No ship-blocking issues found; the open items are all about verifying oxfmt's ignore/coverage behavior before merge.

✅ No critical issues found.

🟡 P2 — recommended

  • package.json:71 — The root lint-staged **/*.{...json...} rule now runs oxfmt on staged files, which matches packages/api/openapi.json; the only protection is ignorePatterns in .oxfmtrc.json, and if oxfmt does not apply ignorePatterns to explicitly-passed paths the auto-regenerated spec gets reflowed and check-openapi-sync.sh goes permanently red.
    • Fix: Before merge, confirm oxfmt honors ignorePatterns when a file is passed explicitly by lint-staged; if it does not, exclude openapi.json at the lint-staged glob level instead.
    • testing, maintainability
  • .oxfmtrc.json:13 — The deleted packages/app/.prettierignore entries (.next, .next-e2e, next-env.d.ts) were not migrated into ignorePatterns, so oxfmt --check '**/*.{ts,tsx,css,scss}' will try to format the generated next-env.d.ts unless oxfmt honors the root .gitignore.
    • Fix: Verify oxfmt skips .gitignored paths; if it does not, re-add next-env.d.ts/.next/.next-e2e to ignorePatterns.
    • maintainability, testing
  • package.json:71 — The lint-staged glob **/*.{mdx,json,yml,css,scss} is piped to oxfmt --no-error-on-unmatched-pattern, so any extension oxfmt cannot format (likely yml/mdx) becomes a silent no-op, dropping pre-commit format enforcement that prettier previously provided for those types.
    • Fix: Confirm oxfmt formats .yml and .mdx; if not, keep a formatter for them or remove the unsupported extensions from the glob so the config does not advertise coverage it lacks.
    • testing, maintainability
  • .claude/skills/refactor-component/SKILL.md:181 — The committed PR correctly migrates this line to oxfmt, but the review checkout's working tree has an uncommitted revert back to npx prettier --write, which would pull an unpinned prettier (now removed from devDependencies) and produce formatting that fights oxfmt if committed.
    • Fix: Discard the uncommitted working-tree edit so the line stays as npx oxfmt <file>; do not include it in the PR.
    • project-standards, agent-native
🔵 P3 nitpicks (2)
  • .oxfmtrc.json:13 — ignorePatterns duplicates three entries already in the root .gitignore (dist, coverage, .volumes) while relying on .gitignore for others, so the ignore model has two overlapping sources of truth.
    • Fix: Keep only the non-.gitignored exception (packages/api/openapi.json) in ignorePatterns if oxfmt honors .gitignore.
  • .github/scripts/release-notes.mjs:10 — Rationale comments (lines ~10, 25, 62, 130) and a test name in release-notes.test.mjs:111 still attribute CHANGELOG.md blank-line reflow to prettier, which no longer formats markdown in this repo.
    • Fix: Reword the comments to describe tolerance of manual/editor blank-line variation rather than naming prettier.

Reviewers (7): correctness, testing, maintainability, project-standards, previous-comments, agent-native, learnings-researcher.

Testing gaps:

  • The migrated CI format gate (nx ci:lint) was itself rewritten in this PR and is the only check of the reformat; there is no independent idempotency/golden-file check proving oxfmt output is stable across the tree.
  • No pre-commit fixture confirms .yml/.mdx/.json files are actually reformatted (vs silently skipped) by the new lint-staged rule.
  • The correctness reviewer did not return before synthesis; its lens (semantic equivalence of reflows) was covered directly by the orchestrator and corroborated by the testing reviewer. previous-comments and learnings-researcher found nothing actionable (the changeset-bot and e2e-ENOENT comments are tooling-only/infra noise; no prior formatter-migration learnings exist in docs/solutions/).

No finding blocks merge automatically. A maintainer will expect P0/P1 findings in code this PR changes to be fixed; P2/P3 are your call -- fix or reply. Never fix findings about surrounding code here; reply instead. Do not widen the PR. How to respond

@pulpdrew pulpdrew changed the title ci: Migrate to oxfmt ci: Migrate from prettier to oxfmt Nov 19, 2026

@brandon-pereira brandon-pereira left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Formatting works great!

Base automatically changed from drew/oxlint to main November 20, 2026 16:38

This branch was successfully deployed

2 active deployments
Preview – hyperdx-storybook — 9e5149f5 Deployed Nov 20, 2026 by vercel[bot]
Preview – hyperdx-oss — 9e5149f5 Deployed Nov 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review/tier-3 Standard — full human review required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants